package day_2022_4_to_7.day48;

import java.util.ArrayList;
import java.util.Scanner;

/**
 * 解析参数
 * @author haomin
 * @date 2022/05/09 08:31
 **/
public class Day13_1_AnalyticalParameters {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.nextLine();
        if(str == null){
            return;
        }
        String[] data  = str.split(" ");
        ArrayList<String> list = new ArrayList<>();
        for (int i = 0; i < data.length; i++) {
            String cur = data[i];
            if(cur.charAt(0) == '"'){
                if(cur.charAt(cur.length()-1) == '"'){
                    String newOne = "";
                    for (int j = 1; j < cur.length()-1; j++) {
                        newOne += cur.charAt(j);
                    }
                    list.add(newOne);
                }else if(cur.charAt(cur.length()-1) != '"') {
                    String newOne = "";
                    for (int j = 1; j < cur.length(); j++) {
                        newOne += cur.charAt(j);
                    }
                    if(data[i+1].charAt(data[i+1].length()-1) !='"'){
                        while (data[i+1].charAt(data[i+1].length()-1) !='"'){
                            newOne += " ";
                            newOne += data[i+1];
                            i++;
                        }
                    }
                    newOne += " ";
                    for (int j = 0; j < data[i + 1].length() - 1; j++) {
                        newOne += data[i + 1].charAt(j);
                    }
                    list.add(newOne);
                    i++;
                }
            } else {
                list.add(cur);
            }
        }

        System.out.println(list.size());
        for(String s:list){
            System.out.println(s);
        }
    }
}